<?php

namespace app\admin\model\parts;

use think\Model;

/**
 * Outcome
 */
class Outcome extends Model
{
    // 表名
    protected $name = 'parts_outcome';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;


    public function orderInfo(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\order\Info::class, 'order_info_id', 'id');
    }

    public function partsInfo(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\parts\Info::class, 'parts_info_id', 'id');
    }

    public function purposeInfo(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\purpose\Info::class, 'purpose_info_id', 'id');
    }

    public function supplierInfo(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\supplier\Info::class, 'supplier_info_id', 'id');
    }
}